package com.lp.exception;

import com.lp.enums.ResultEnum;

/**
 * Created by lp
 * 2017/11/9 12:27
 */
// 继承RuntimeException时Spring会进行异常回滚；
// 继承Exception时Spring不会进行异常回滚
public class GirlException extends RuntimeException {
    private Integer code;
    public GirlException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
